package com.jdbc;

import java.util.List;
import java.util.Map;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class Demo extends BaseDao{
	/**
	 *查询
	 * */
	public void select (){
		String sql="select * from table_name";
		List<Map<String, Object>> list=super.queryReturnMapList(sql, null, "db_test");
		Map<String, Object> object=super.queryReturnMap(sql, null, "db_test");
		System.out.println(JSONArray.fromObject(list));
		System.out.println(JSONObject.fromObject(object));
	}
	public static void main(String[] args) {
		new Demo().select();
		
	}
}
